import request from '@/config/axios'

export const dashboardApi = {
  /**
   * 获取仪表盘接口
   * @param params
   * @returns
   */
  getDashboard: async () => await request.get({ url: '/dy/series-data/get-dashboard' }),
  /**
   * 获取热门短剧排行
   * @param params
   * @returns
   */
  getHotSeries: async () => await request.get({ url: '/dy/series-data/page' }),

  /**
   * 获取数据分析分页
   * @returns
   */
  getDataAnalysis: async (data) => await request.post({ url: '/series/page-by-name', data }),

  /**
   * 获取类型列表
   * @returns
   */
  getCategoryList: async () => await request.get({ url: '/categories/list' }),
  // getCategoryList: async () => await request.get({ url: '/dy/info/categories' }),

  /**
   * 刷新数据池
   * @returns
   */
  refreshDataPool: async () => await request.post({ url: '/dy/series-data/refresh-data-pool' })
}
